import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:online_study/home/search/search_course.dart';
import 'package:online_study/theme/colors.dart';
import 'package:online_study/theme/size.dart';

//首页搜索 仅做二次跳转
class HomeSearchPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      child: Container(
        padding: EdgeInsets.symmetric(horizontal: ThemeSize.width9),
        height: ThemeSize.height40,
        color: Colors.white,
        child: Row(
          children: [
            Flexible(
                child: Container(
              height: ThemeSize.height30,
              padding: EdgeInsets.symmetric(horizontal: ThemeSize.width9),
              decoration: BoxDecoration(
                  color: ThemeColor.colorSearchInner,
                  borderRadius: BorderRadius.circular(ThemeSize.width15),
                  border: Border.all(
                      color: ThemeColor.colorCorner, width: ThemeSize.width1)),
              child: Row(
                children: [
                  Icon(Icons.search, color: ThemeColor.color999999),
                  Text(
                    "搜索好课",
                    style: TextStyle(
                        color: ThemeColor.color333333,
                        fontSize: ThemeSize.sp13),
                  )
                ],
              ),
            )),
          ],
        ),
      ),
      onTap: () {
        Get.to(() => SearchCoursePage());
      },
    );
  }
}
